<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/html">
<head>
    <meta charset="UTF-8">
    <title>证明材料</title>
    <link th:href="@{/layui/css/layui.css}" rel="stylesheet"/>
    <link th:href="@{/css/common.css}" rel="stylesheet"/>
    <script src="../../js/jquery.min.js"></script>

</head>
<body>

    <div class="imgs">
        <div>
            无证明材料
        </div>
    </div>

</body>

<script>
    var href = window.location.href;
    var loanId = href.split("=")[1];
    $(function () {
        getEvidences(loanId);
    })
    function getEvidences(loanId){
        console.log(window.location.href)
        $.get({
            url: './getEvidences',
            data:{
                "loanId":loanId
            },
            success:function (res) {
                let imgs = res.data;
                if(imgs.length > 0){
                    var imgsHtml = '';
                    for (var i = 0;i < imgs.length;i++){
                        imgsHtml += '<div><img src="' + imgs[i].path +'"></div>';
                    }
                    $(".imgs").html(imgsHtml);
                }
            }
        });
    }
</script>

</html>